package com.dc.project.entity.bo;

import com.dc.project.entity.po.UserVolcengine;
import com.own.component.common.base.entity.BaseBo;
import com.own.constant.ConstantBeanSuffix;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * UserVolcengineBo
 *
 * @author chenxueli
 * @date 2025-04-25 11:33:04
 */
@Schema(title = "用户大模型配置" + ConstantBeanSuffix.BO)
@Getter
@Setter
@ToString
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class UserVolcengineBo extends BaseBo<UserVolcengine> implements Serializable {

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 基础url
     */
    private String baseUrl;

    /**
     * api key
     */
    private String apiKey;

    /**
     * 模型id
     */
    private String modelId;

    /**
     * 转持久化对象
     *
     * @param entity 原持久化对象
     * @return 持久化对象
     */
    @Override
    public UserVolcengine toPo(UserVolcengine entity) {
        if (entity == null) {
            entity = new UserVolcengine();
        }
        entity.setFkUserId(this.userId);
        entity.setBaseUrl(this.baseUrl);
        entity.setApiKey(this.apiKey);
        entity.setModelId(this.modelId);
        return super.toPo(entity);
    }

}

